#ifndef __SYS_DATABASE_H__
#define __SYS_DATABASE_H__

/// <summary>
/// Database Macros
/// </summary>
#define DATA_MAGIC 0x20406080
#define DATA_ITEM_OFFSET 32

/// <summary>
/// The Database structure
/// describes a kernel-mode device
/// context to create.
/// </summary>
typedef struct _Database
{
	int handle;
	int offset;
	int item_count;
	int item_offset;
	int item_index;
	int item_size;

} Database, *DatabasePtr;

/// <summary>
/// Database Pipeline
/// </summary>
int DatabaseOpen(const wchar_t *path, DatabasePtr pdb);
int DatabaseWrite(DatabasePtr pdb, const void *data);
int DatabaseRead(DatabasePtr pdb, void *data);
int DatabaseSetItemSize(DatabasePtr pdb, int size);
int DatabaseClose(DatabasePtr pdb);

#endif
